package com.win.service.impl;

import com.win.mapper.TableMapper;
import com.win.pojo.Table;
import com.win.service.TableService;
import com.win.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class TableServiceImpl implements TableService {

    @Autowired
    private TableMapper tableMapper;
    @Override
    public Result getAll() {
        List<Table> tables = tableMapper.getTables();
        Map map = new HashMap<>();
        map.put("tablesInfo",tables);
        return Result.ok(map);
    }
}
